<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>counter</title>
    <style>
        #app{
            font-size: 100px;
            margin: 0  auto;
            text-align: center;
            margin-top: 15%;
        }
    </style>
</head>
<body>
    <div id="app"></div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    Vue.createApp({
        data(){
            return{
                counter:0
            }
            
        },
        mounted(){
            setInterval(() => {
                this.counter+=1
            }, 1000);
        },
        template:"<div>{{counter}}</div>"
    }).mount("#app");

</script>

</html>